<%= render :partial => "progress" %>

<div class="span-18 last">

	<h2>Attachments hinzufügen</h2>

			Antrag: <b><%=h @proposal.title %></b>
			<%=h truncate(@proposal.description, :length => 100) %>
			<%= link_to 'Antrag editieren', '/submit/edit/'+@proposal.id.to_s %>


<p>
</p>
<hr>

<table>
  <tr>
    <th>Dateien</th>

  </tr>


<% @documents.each do |document| %>
  <tr>
    <td>
			<%= link_to '', proposal_document_path(@proposal, document), :confirm => 'Sind Sie sicher?', :method => :delete,:class => "delete" %>
			<%= link_to document.document_file_name, document.document.url %> <%= number_to_human_size(document.document_file_size) %></td>

  </tr>
<% end %>

<% form_for([@proposal, @document], :html => { :multipart => true}) do |f| %>
  <%= f.error_messages %>
	<tr class="success">
		<td>
			Datei hinzufügen:<br><%= f.file_field :document, :onchange => 'document.getElementById("new_document").submit();' %><br>
			</td> 
	</tr>
	

</table>
<hr>

<% end %>
<p><%= button_to 'Weiter', "/submit/check/" + @proposal.id.to_s  %> | <%= link_to 'zurück', '/submit/edit/'+@proposal.id.to_s %></p>

</div>
